package com.atguigu.springcloud.controller;

import com.atguigu.springcloud.entitues.CommonResult;
import com.atguigu.springcloud.feign.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author fxz
 * @date 2021/5/22 12:42
 **/
@RestController
@RequestMapping("/consumer")
public class FeignController {

    @Autowired
    private FeignService feignService;

    @GetMapping("/payment/get/{id}")
    public CommonResult getPaymentById(@PathVariable("id") Long id){
        return feignService.getPaymentById(id);
    }
}
